//
//  ZWMenuButton.swift
//  ZWWeibo
//
//  Created by flyiron on 16/4/25.
//  Copyright © 2016年 flyiron. All rights reserved.
//

import UIKit


class ZWMenuButton: UIButton {
    
    override var highlighted:Bool {
        get{
            return false
        }
        set{
            
        }
        
    }
    override init(frame: CGRect) {
        super.init(frame: frame)
        setupUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    private func setupUI(){
        titleLabel?.textAlignment = .Center
        imageView?.contentMode = .Center
    }
    
    override func layoutSubviews() {
        super.layoutSubviews()
        self.imageView?.frame = CGRectMake(0, 0, self.frame.width, self.frame.height)
        self.titleLabel?.frame = CGRectMake(0, self.frame.width, self.frame.width, self.frame.height-self.frame.width + 10 )
    }
}
